import request from '@/utils/request'
import { PromiseData } from '@/@types/request'
import { TableList, TaskListParams } from './data'

// 查询医院信息
export const getCityList = (data: TaskListParams): Promise<PromiseData<TableList>> =>
  request.post('/dataEscalationExamine/search/HospitalAll', data)

// 退回操作
export const getGoBack = (data: {
  dataReportQuarter?: string
  dataReportYear?: string
  hospitalId?: number
  id?: number
  returnReason?: string
}): Promise<PromiseData<{ message: string; success: number }>> => request.post('/dataEscalationExamine/goBack', data)

// 省市管理员数据查看详情筛选导出
export const deportDataExportDetails = (data: {
  dataReportQuarter: string
  dataReportYear: string
  hospitalName: string
  reportStatus: string
  cityId: number
}): Promise<Blob> => request.post('/dataEscalationExamine/deportDataExportDetails', data, { responseType: 'blob' })
